<!DOCTYPE html>
<html>
<head>
    <base href="${BASE_PATH}">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="keywords" content="${HEAD_KEYWORDS}">
    <meta name="description" content="${HEAD_DESCRIPTION}">
    <title>${HEAD_TITLE}</title>
    <link href="page/admin/index/login.css" rel="stylesheet" type="text/css"/>
    <!--[if lt IE 9]>
    <script src="component/jui/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <![endif]-->
    <!--此条ie9及以上及非ie可识别-->
    <!--[if gte IE 9]><!-->
    <script src="component/jui/js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <!--<![endif]-->
    <script src="component/util/md5.js" type="text/javascript"></script>
    <script type="text/javascript">
        function login() {
            var username = $('[name="username"]').val();
            if (username == '') {
                alert('用户名不能为空！');
                return;
            }
            var pwd = $('#realPassword').val();
            if (pwd == '') {
                alert('密码不能为空！');
                return;
            }
            var imageCode = $('[name="imageCode"]').val();
            if (imageCode == '') {
                alert('验证码不能为空！');
                return;
            }
            if (imageCode.length != 4) {
                alert('验证码输入错误！');
                return;
            }
            $('[name="password"]').val($.md5(pwd));
            var form = $('#form')[0];
            form.action = "admin/login";
            form.submit();
        }
        <!-- jQuery 当键盘敲击【ENTER】键时，系统登录 -->
        $(document).ready(function () {
            $("body").keydown(function (event) {
                if (event.which == 13) {
                    login();
                }
            });
        });
        function loadPicimageCode() {
            document.getElementById("picimageCode").src = 'image_code.png?' + new Date().getTime();
        }
    </script>
</head>
<body>
<div style="height: 30px;background: url(component/jui/themes/default/images/login_bg.png) repeat-x 0 10px;"></div>
<!--<canvas id="canvas" style="position: absolute;z-index: -1;left:0px;top:0px"></canvas>-->
<div id="login">
    <div id="login_header">
        <h1 class="login_logo">
            <a href=""><img src="image/admin/login_logo.png"/></a>
        </h1>
        <div class="login_headerContent">
            <div class="navList">
                <ul>
                    <!--<li><a href="#">设为首页</a></li>
                    <li><a href="http://bbs.dwzjs.com">反馈</a></li>
                    <li><a href="doc/dwz-user-guide.pdf" target="_blank">帮助</a></li>-->
                </ul>
            </div>
            <h2 class="login_title"><!--<img src="/images/admin2/login_title.png"/>-->后台管理系统</h2>
        </div>
    </div>
    <div id="login_content">
        <div class="loginForm">
            <form id="form" action="" method="post">
                <p>
                    <label>用户名：</label>
                    <input type="text" name="username" autofocus="autofocus" autocomplete="off" size="20"
                           class="login_input" title=""/>
                </p>
                <p>
                    <label>密码：</label>
                    <input type="password" id="realPassword" autocomplete="off" size="20" class="login_input" title=""/>
                    <input type="hidden" name="password">
                </p>
                <p>
                    <label>验证码：</label>
                    <input class="code" type="text" name="imageCode" size="4" title=""/>
                    <span>
                        <img id="picimageCode" src="image_code.png" alt="" width="75" height="24"
                             onclick="loadPicimageCode()"/>
                    </span>
                </p>
                <p>
                    <input type="checkbox" name="rememberMe" value="true" class="remenberMe" title="">记住我（14天免登录）
                </p>
                <div class="login_bar">
                    <input class="sub" type="button" onclick="login();" value="登录"/>
                </div>
                <p style="color:#FFCC00;font-weight:bold ;padding-top: 10px;font-size: 18px;">
                    提示：${msg!}
                </p>
            </form>
        </div>
        <div class="login_banner"><img src="image/admin/login_banner.png" width="950" height="270"/></div>
        <div class="login_main">
            <ul class="helpList">
                <!-- <li><a href="#">下载驱动程序</a></li>
                 <li><a href="#">如何安装密钥驱动程序？</a></li>
                 <li><a href="#">忘记密码怎么办？</a></li>
                 <li><a href="#">为什么登录失败？</a></li>-->
            </ul>
            <div class="login_inner">
                <p>分享的是一种生活，一种情绪，一种态度</p>
                <p>炫耀新入手的物品；晒出有品位的物件，展示自己的生活品味</p>
                <p>结识到跟你有共同生活方式或者有共同兴趣爱好的朋友</p>
                <p>能收集各种达人、素人帮你推荐、评测你想买的物品</p>
                <p>系统版本：${version!}</p>
            </div>
        </div>
    </div>
    <div id="login_footer" style="font-size: 15px;">
        上海云活信息技术有限公司<!--  Copyright &copy; 2009 www.dwzjs.com Inc. All Rights Reserved.-->
    </div>
</div>
<!-- <script>
    $(function () {
        //定义画布宽高和生成点的个数
        var WIDTH = window.innerWidth, HEIGHT = window.innerHeight, POINT = 30;
        var canvas = document.getElementById('canvas');
        if (!canvas || !canvas.getContext) {
            return;
        }
        canvas.width = WIDTH;
        canvas.height = HEIGHT;
        var context = canvas.getContext('2d');
        context.strokeStyle = 'rgba(0,0,0,0.02)';
        context.strokeWidth = 1;
        context.fillStyle = 'rgba(0,0,0,0.05)';
        var circleArr = [];

        //线条：开始xy坐标，结束xy坐标，线条透明度
        function Line(x, y, _x, _y, o) {
            this.beginX = x;
            this.beginY = y;
            this.closeX = _x;
            this.closeY = _y;
            this.o = o;
        }

        //点：圆心xy坐标，半径，每帧移动xy的距离
        function Circle(x, y, r, moveX, moveY) {
            this.x = x;
            this.y = y;
            this.r = r;
            this.moveX = moveX;
            this.moveY = moveY;
        }

        //生成max和min之间的随机数
        function num(max, _min) {
            var min = arguments[1] || 0;
            return Math.floor(Math.random() * (max - min + 1) + min);
        }

        // 绘制原点
        function drawCricle(cxt, x, y, r, moveX, moveY) {
            var circle = new Circle(x, y, r, moveX, moveY);
            cxt.beginPath();
            cxt.arc(circle.x, circle.y, circle.r, 0, 2 * Math.PI);
            cxt.closePath();
            cxt.fill();
            return circle;
        }

        //绘制线条
        function drawLine(cxt, x, y, _x, _y, o) {
            var line = new Line(x, y, _x, _y, o);
            cxt.beginPath();
            cxt.strokeStyle = 'rgba(0,0,0,' + o + ')';
            cxt.moveTo(line.beginX, line.beginY);
            cxt.lineTo(line.closeX, line.closeY);
            cxt.closePath();
            cxt.stroke();
        }

        //初始化生成原点
        function init() {
            circleArr = [];
            for (var i = 0; i < POINT; i++) {
                circleArr.push(drawCricle(context, num(WIDTH), num(HEIGHT), num(15, 8), num(20, -20) / 20, num(20, -20) / 20));
            }
            draw();
        }

        //每帧绘制
        function draw() {
            context.clearRect(0, 0, canvas.width, canvas.height);
            var i;
            for (i = 0; i < POINT; i++) {
                drawCricle(context, circleArr[i].x, circleArr[i].y, circleArr[i].r);
            }
            for (i = 0; i < POINT; i++) {
                for (var j = 0; j < POINT; j++) {
                    if (i + j < POINT) {
                        var A = Math.abs(circleArr[i + j].x - circleArr[i].x),
                            B = Math.abs(circleArr[i + j].y - circleArr[i].y);
                        var lineLength = Math.sqrt(A * A + B * B);
                        var C = 1 / lineLength * 7 - 0.009;
                        var lineOpacity = C > 0.03 ? 0.03 : C;
                        if (lineOpacity > 0) {
                            drawLine(context, circleArr[i].x, circleArr[i].y, circleArr[i + j].x, circleArr[i + j].y, lineOpacity);
                        }
                    }
                }
            }
        }

        //调用执行
        init();
        // document.body.style.background = "url('"+canvas.toDataURL()+"')";
        setInterval(function () {
            //每过16毫秒清空画布并重画，达到动态效果,暂时不做IE8兼容
            for (var i = 0; i < POINT; i++) {
                var cir = circleArr[i];
                cir.x += cir.moveX;
                cir.y += cir.moveY;
                if (cir.x > WIDTH) cir.x = 0;
                else if (cir.x < 0) cir.x = WIDTH;
                if (cir.y > HEIGHT) cir.y = 0;
                else if (cir.y < 0) cir.y = HEIGHT;
            }
            draw();
        }, 100);
    });
</script> -->
</body>
</html>